package com.hwy.struts.demo;

import java.util.Map;

import org.apache.struts2.ServletActionContext;
import org.apache.tomcat.jni.User;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.util.ValueStack;
import com.sun.org.apache.bcel.internal.generic.NEW;

public class ValueStackDemo extends ActionSupport {
	public String execute() {
		ValueStack valueStack = ActionContext.getContext().getValueStack();
		
//		valueStack.push(new com.hwy.struts.domain.User("hwy"));
		// 数据放入valueStack的Root中
//		com.hwy.struts.domain.User user = new com.hwy.struts.domain.User("AAAA");
//		valueStack.push(user);
		ServletActionContext.getRequest().setAttribute("aa", 1123);
		return SUCCESS;
	}
}
